using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;

namespace BizTalk.BuildGenerator.Tasks.Tests.BAM
{
    /// <summary>
    /// Contains tests for the bam tasks
    /// </summary>
    [TestClass]
    public class BamTasksTests : MSBuildTest 
    {
        /// <summary>
        /// Executes the bam msbuild test
        /// </summary>
        [TestMethod]
        public void RunBamMsBuildTest()
        {
            string arguments = "BAMMsBuildScript.msbuild /t:Build";
            int result = RunMSBuild(arguments);
            Assert.IsTrue(result == 0, "The MSBuild Task failed.");
        }

        /// <summary>
        /// Pretest setup
        /// </summary>
        [TestInitialize]
        public void Setup()
        {
            base.GetFileAndWriteToPath("BizTalk.BuildGenerator.Tasks.Tests.BAM.BAMMsBuildScript.msbuild", "BAMMsBuildScript.msbuild");
            //base.GetFileAndWriteToPath("BizTalk.BuildGenerator.Tasks.Tests.BAM.BamWorkbook.xls", "BamWorkbook.xls");
            //base.GetFileAndWriteToPath("BizTalk.BuildGenerator.Tasks.Tests.BAM.FileProcess.btt", "FileProcess.btt");            
        }
        /// <summary>
        /// Cleans after test
        /// </summary>
        [TestCleanup]
        public void CleanUp()
        {
            //File.Delete("BAMMsBuildScript.msbuild");            
        }
    }
}
